/**
 * @file Judge.h
 * @author enemy1205 (enemy1205@qq.com)
 * @brief 决策类头文件
 * @date 2021-10-03
 */
#pragma once

#include "Tracker.h"

class Judge {
public:
    //返回正在追踪的目标
    auto getTrackingTarget() const { return this->pTrackingTarget; }

    virtual void Judging(std::vector<tracker_ptr> &trackers, const bool &hasNoFeatures) = 0;

    Judge();

    bool isTracking() { return this->hasTarget; }

protected:
    tracker_ptr pTrackingTarget;// 正在追踪的目标
    float score;                //决策得分
    cv::Vec<uint8_t, 3> judgeData;//发送给电控的决策数据
    bool hasTarget;            //当前模式
};

using Judge_ptr = std::unique_ptr<Judge>;

class ArmorJudge : public Judge {
public:
    void Judging(std::vector<tracker_ptr> &trackers, const bool &hasNoFeatures) override;
};

class RuneJudge : public Judge {
    void Judging(std::vector<tracker_ptr> &trackers,const bool &hasNoFeatures) override;
};